Imports System.Data.SqlClient

Partial Class ShowVouchers
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim cmdParams(0) As System.Data.Common.DbParameter
        If (Request.QueryString.Get("mode") = "r") Then
            cmdParams(0) = DBHelper.CreateParameter("@IsReciept", Data.DbType.Int16, 1)
            lblHeader.Text = "Cash Reciepts"
        Else
            cmdParams(0) = DBHelper.CreateParameter("@IsReciept", Data.DbType.Int16, 0)
            lblHeader.Text = "Payment Vouchers"
        End If

        Dim dt As System.Data.DataTable = DBHelper.ExecuteTable(Data.CommandType.StoredProcedure, "uspGetAllVouchers", cmdParams)
        dt.TableName = "VoucherDetails"

        drgList.DataSource = dt
        drgList.DataBind()

        If (Request.QueryString.Get("mode") = "r") Then
            drgList.Columns(7).Visible = False
            drgList.Columns(8).Visible = False
            drgList.Columns(9).Visible = False
        Else
            drgList.Columns(5).Visible = False
            drgList.Columns(6).Visible = False
        End If

     
    End Sub

    Protected Sub drgList_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles drgList.ItemDataBound
        Dim st As String
    End Sub
End Class
